package com.wrupple.vegetate.domain;

import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable
public class JDOPersistentFileMetadata implements PersistentFileMetadata, CatalogObject{
	/**
	 * 
	 */
	private static final long serialVersionUID = 5262384310744368380L;
	public static final String CATALOG_ID="PersistentFileMetadata";
	@PrimaryKey
	@Persistent
	private Long id;
	@Persistent
	private String name;
	@Persistent
	private String mime;

	@Override
	public void setIdAsString(String id) {
		this.id = Long.parseLong(id);
	}
	@Override
	public String getIdAsString() {
		return String.valueOf(id);
	}

	@Override
	public String getName() {
		return name;
	}

	@Override
	public void setName(String name) {
		this.name =name;
	}
	public String getId() {
		return getIdAsString();
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getMime() {
		return mime;
	}
	public void setMime(String mime) {
		this.mime = mime;
	}

}
